﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>02: Dispatcher Test</title>
	<style type="text/css">
		body, html {
			width: 100%;
			height: 100%;
			margin: 0;
			overflow: hidden;
		}
	</style>
	<script src="../bootloader.js" type="text/javascript"></script>
	<script type="text/javascript">
		go = function() {
			// setup a view and a dispatcher
			view = new opus.View({
				name: "view",
				styles: {padding: 32},
				controls: [
					{onclick: "click", content: "Hi", l:100, t:10, w:100, h:100, content: "Woo", styles: {bgColor: "#88F", padding: 16}},
					{onclick: "mooClick", content: "Hi", l:100, t:140, w:100, h:100, content: "Moo", styles: {bgColor: "#F88", padding: 16}},
					{onclick: "click", content: "Hi", l:100, t:270, w:100, h:100, content: "Zoo", styles: {bgColor: "#8F8", padding: 16}}
				],
				click: function(inSender, inEvent, inTargetName) {
					alert(inTargetName + ": click");
				},
				mooClick: function(inSender, inEvent, inTargetName) {
					alert("yeah ... mooo.");
				}
			});
			// render view to DOM
			view.render();
		}
	</script>
</head>
<body onload="go()" onresize="view.resize()">
</body>
</html>
